const fs = require("fs");
const path = require("path");
const fullPath = path.resolve(__dirname, "./data.txt");

// 同步写入
fs.writeFileSync(fullPath, "同步写入");
